<?php
class Show360Controller extends Controller{
	public function actionConf($id=null){
		$mod = new Show360Model();
		$yu = $mod->get_by_key($id);
		if(empty($yu)){
			$conf = array(
				'st' 	=> false,
				'info' 	=> '信息不完整！',
			);
		}else{
			$conf = array(
				'serials' => $yu['servial'],
			
				//路径
				'path' => IMAGE_PATH . $yu['base_path'] . '/3d',
			
				'code' => "FDF_DFEF",
			
				//角度数量
				'count' => count($yu['pictures']),
			
				//缩放比例为1的图片宽
				'srcW' => $yu['width'] / pow(2, $yu['zoom'] - 1),
			
				//缩放比例为1的图片高
				'srcH' => $yu['height'] / pow(2, $yu['zoom'] - 1),
			
				'revert' => true,
			
				//默认放大倍数
				'defaultZoomLevel' => 1,
			
				//最大放大倍数，有4级，即表示zoomLevel最大可到4
				'maxZoom' => 4,
			
				//最大可旋转放大倍数，越过此倍数后，不再支持旋转而直接转成移动
				'maxClockwiseZoom' => 2,
			
				//图片类型
				'imgType'  =>  $yu['type'],
			
				//加载状态
				'st' => true
			);
		}
		$callback = $_REQUEST['callback'];
		ob_clean();
		echo $callback . '(' . json_encode($conf) . ')';
	}
}

?>